package com.basin.auth.core.strategy.impl;

import com.alibaba.fastjson2.JSON;
import com.basin.auth.common.form.PhoneForm;
import com.basin.auth.core.strategy.LoginStrategy;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author: Sam ZHONG | sammy1997@aliyun.com
 */
@Component
@Slf4j
public class PhoneLoginStrategy implements LoginStrategy {
    @Override
    public String login(Object credentials) {
        // 转化
        PhoneForm phoneForm = JSON.to(PhoneForm.class, credentials);
        log.info("当前为手机号验证码登录，表单数据为：{}", phoneForm);
        return null;
    }
}
